home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 November / macformat-030.iso / Shareware City / Utilities / File Safari ƒ / Release Note.c < prev   
Encoding:
Text File  |  1995-05-01  |  18.8 KB  |  348 lines  |  [TEXT/MMCC]

  1. /*
  2.  
  3. Changes in 1.1b4 — 95\04\22:
  4.   —Changed the way I send the openDoc Æ so app’s like SimpleText won’t open
  5.    an untitled window before receiving the openDoc Æ.
  6.   —Moved all functions for exporting search results to their own segment
  7.    so we aren’t wasting space with it.
  8.   —Added Grep search option — by request. The only drawback of this is that
  9.    some of the regex functions use malloc, which allocates a huge pointer
  10.    in the heap, even though very little of it is used. If you don’t like
  11.    the regex options I’m using, lemme know.
  12.   —Added pref to store last search string, mainly because I got sick of
  13.    re–typing the same grep strings over and over while testing.
  14.   —Oh yeah, had to turn on 4-byte int’s so regex would use long’s.
  15.   —Implemented File Types option in the main dialog. This removes the TEXT
  16.    Files Only checkbox from the Search Options dialog. Read the Balloon Help
  17.    or the How To Use FS file to learn how it works.
  18.   —Added ‘Goto’ resources so new goto–line Æ’s can be added for other app’s
  19.    more easily without having to recompile the source.
  20.   —Got rid of Ask Before Opening (rez files) menu item.
  21.   —Changed other things in File menu. Use Editors menu item means use the
  22.    appropriate editor if it’s checked, or use the file’s original creator
  23.    if it’s unchecked. You can still force a rez fork match to be opened with
  24.    the Data Fork Editor.
  25.   —Restructured the way app’s are launched and files are opened when user
  26.    double–clicks on a search result.
  27.   —I think I updated all the Balloon Help.
  28.   —Updated Save Results for new flags and Types & Creators.
  29.   —Added ability to choose editors by selecting a running process. Hold the
  30.    Option key before clicking in the File menu.
  31.   —Added Options menu that mirrors the Search Options, File Types, and Other
  32.    Search Dir buttons on the main window, just so it would be apparent that
  33.    there are key equivs for the buttons (which I was going to add anyway since
  34.    I hate using the mouse for such things).
  35.   —Removed all the PICT’s from the help doc.
  36.  
  37.  
  38. Changes in 1.1b3 — 95\04\06:
  39.   —Added Whole Words search option. (Requested a long time ago, but I forgot
  40.    about it.) The table for delimiting words in resource ‘dlim’ ID 132, just
  41.    in case you don’t like the way I’m delimiting words (0 = not part of a
  42.    word; 1 = part of a word).
  43.   —User reported an *extreme* slow–down on 7100/66 when RAM Doubler is
  44.    installed. This is because File Safari uses almost all available free
  45.    memory for the search buffer. This causes RD to go nuts. So I added an
  46.    option called “RAM Doubler is Evil Mode” which disables FS from using
  47.    temp mem. FS is also a tad slower with RD installed on a 68k Mac.
  48.   —Changed email address in about box and elsewhere.
  49.  
  50.  
  51. Changes in 1.1b2 — 95\03\23:
  52.   —Fixed bug where detailed rez search would close a rez file if the file
  53.    was already open. Especially bad if the file happens to be File Safari’s
  54.    own rez fork.
  55.   —Explicitly look for a refNum == the app’s refNum so we don’t close it
  56.    during searches.
  57.   —Added options for exporting the Search Results:
  58.    •Wide Format: Makes the exported text twice as wide as normal. This is
  59.                  a bit slower because it reads each found file again so
  60.                  it can get the extended data for each match.
  61.    •Offsets & Stuff: Write a line after each match that tells the offset
  62.                      in file/rez, and rez type and ID if it was a detailed
  63.                      rez search.
  64.    •Full Pathnames: Write the full pathname of each file instead of only the
  65.                     truncated file name.
  66.    This whole thing turned out to be pretty messy. I cleaned it up as much as
  67.    possible, but I wouldn’t put money on it being bug–free. That’s what beta
  68.    testers are for!! :D
  69.  
  70.  
  71. Changes in 1.1b1 — 95\02\24:
  72.   —Added Detailed Rez Search option to Search Options menu. What this does
  73.    is search each rez fork rez–by–rez instead of reading the entire rez
  74.    fork block into a single chunk. This allows the rez type and ID to be
  75.    seen in the File Info popup seen when the mouse is held down on a match.
  76.   —Added key equivs for the results scrollbar:
  77.      Command–downArrow…………………………1 line down
  78.      Command–upArrow………………………………1 line up
  79.      Command–Option–downArrow………1 page down
  80.      Command–Option–upArrow……………1 page up
  81.   —Added option for searching/skipping nested folders.
  82.   —Reworked Search Options into a dialog instead of the popup menu. This
  83.    makes it a lot easier to set a bunch of options at once instead of
  84.    having to aim/click/move/release a bunch of times.
  85.   —Did away with the secret Skip Rez Header option. It will always be
  86.    searched when not using the Detailed Rez Search option.
  87.   —Added check to see if a dir has already been added to the Recent Search
  88.    Dirs menu so it doesn’t show up more than once.
  89.   —Fixed an old #define that set the pref file’s creator to the wrong
  90.    thing when it’s created.
  91.   —Added Search Type popup menu to main window. This gives you three options:
  92.      •New Search: Clears the previous search results and searches as normal.
  93.      •Append Search: Appends the next search results to the existing search
  94.       results.
  95.      •Search Existing: Searches only the files listed in the current search
  96.       results list (old results cleared first).
  97.   —Fixed a temp memory bug (not MY bug, but Apple’s:) where the actual amount
  98.    of available free temp memory was NOT what was returned from TempMaxMem
  99.    when called *only for the very first time* in the program (7.1, SU3.0).
  100.   —Fixed a bug in searchInFile where it would skip searching the rest of a
  101.    file if First Occurrence Only was turned on. Oops.
  102.   —Fixed © date in How To… and about box.
  103.  
  104.  
  105. Release of 1.0.3 — 95\02\23.
  106.  
  107.  
  108. Changes in 1.0.3b1 — 95\02\13:
  109.   —Added Recent Search Dirs menu item. Any search dir used from the Other…
  110.    button or by drag & dropping a volume will be added to this submenu and
  111.    will stick around until the program quits. { Requested by MetaTheory. }
  112.   —The main window is now wider (640), unless the screen is <640 wide, then
  113.    it’s the old width. { Requested by MetaTheory. }
  114.   —Had bug report { Per.Mildner } of address 0 being dereferenced in
  115.    ABOUTVERSUSERITEM when it called pstrcpy, but I couldn’t find anything
  116.    wrong, unless the handle returned from GetResource was NULL. So I put in
  117.    a check for that and passed the shortVers directly to TextBox instead of
  118.    pstrcpy’ing it to another variable, which was senseless to begin with.
  119.   —Fixed a Balloon Help typo.
  120.   —Had a request to add each file’s full pathname to the export file. No,
  121.    it wouldn’t take much to do it, but it would make the export file a lot
  122.    harder to read, and the existing code is very clean. And since this is
  123.    the only request for this feature, I’m opting not to do it.
  124.   —No events could be processed after choosing “Hide File Safari” from the
  125.    app menu after initiating a search. Setting the doesActivateOnFGSwitch
  126.    bit in the ‘SIZE’ fixed it (but doesn’t make sense).
  127.   —Added Command–S key equiv to Get Other Search Dir… custom get file
  128.    box to select the Select button.
  129.  
  130.  
  131. Changes in 1.0.2 — 95\02\10 (daytime, normal person hours):
  132.   —Found and fixed a bug where FS would crash after sending the ÆOpenDoc
  133.    to the editor (in this case, MuffEdit) and THEN tried opening the file
  134.    to find the line number, even though MuffEdit doesn’t support goto–line
  135.    Æ’s. Now I get the line number *before* sending the openDoc Æ and then
  136.    check to see if the editor handles goto–line Æ’s and only send it if
  137.    it does. Cripes, I hate finding these things after distributing an app
  138.    all over the damned world. I think I’ll wait a few days before releasing
  139.    1.0.2, just in case more bugs are found, but of course there aren’t any
  140.    more because I’m so goll durn optimistic! :) { Bug found by MetaTheory. }
  141.  
  142.  
  143. Changes in 1.0.1 — 95\02\10:
  144.   —Fixed bug where I tried to get the line number of a match when it was
  145.    in a rez fork. Now the “Line Number” menu item is disabled and says
  146.    “N/A” when a rez file match is clicked on. Yes, I ended that sentence
  147.    with a preposition.
  148.   —Added more tests if a file was found during the search but can’t be
  149.    found when clicked on.
  150.  
  151.  
  152. Changes in 1.0 — 95\01\26 — final release:
  153.   —Search buttons weren’t being updated when user did a Paste.
  154.  
  155.  
  156. Changes in 1.0b6 — 95\01\15:
  157.   —I was messing around with passing NULL in some parms of GetDialogItem.
  158.    This worked fine on my IIci with 7.1, but I had a report from MetaTheory
  159.    who was running EvenBetterBusError that I was writing to NIL. Thanks to
  160.    that EBBE, I found the problem was me passing NULL to GDI. Fixed that.
  161.    Also found a few others.
  162.   —Added a pref to save the position of the window.
  163.   —Fixed something in TE32K where the top of the results text would be
  164.    scrolled off the bottom of the window while lines of text were being
  165.    added during a search.
  166.   —Fixed handling of the results scrollbar thumb so the correct value is
  167.    calculated as a long instead of a short.
  168.   —Added extra call to smallEvent to catch aborts earlier.
  169.   —Forgot to SetPort the about box.
  170.   —Fixed bug in findAppInDesktops where an entry was found in the Desktop
  171.    database, but the file no longer existed on the volume, so it skips that
  172.    volume and searches the next.
  173.   —Added code to send the appropriate goto–line Apple® Event to the text
  174.    editor so the double–clicked line will be brought into view. So far the
  175.    only goto–line Æ’s implemented are for 68k and PPC MW C/C++ and Pascal
  176.    and BBEdit (the only editors I could find around here that support
  177.    goto–line Æ’s).
  178.  
  179.  
  180. Changes in 1.0b5 — 94\12\30:
  181.   —If the openDoc Æ can’t be sent to an application for some reason, I now
  182.    ask the user if they want to use their TEXT Editor to view the file.
  183.   —Added Hex Search button.
  184.   —Added 1st Occurance Only option.
  185.   —Amalgamated all search options into a single Options popup menu in the
  186.    main window to declunkify the interface.
  187.   —Changed flags pref into a different format that’s more easily updated in
  188.    future versions (a long instead of a bunch of Booleans). Also, old Pref’s
  189.    files won’t lose the user’s settings when it’s updated to a new version.
  190.    And it’s smaller.
  191.   —Added test for files not being able to be opened and ask user if they want
  192.    to skip the file and continue or not.
  193.      —Added a beep when the search has completed.
  194.      —Added pref for keeping the last Search Dir chosen from the popup menu or
  195.    if the user selects Add Current Search Dir. Search Dir’s chosen by any
  196.    other means won’t be remembered. I prefer doing it this way rather than
  197.    saving yet another alias.
  198.      —Changed the way I keep track of found files. Used to just keep the parID
  199.    and name. Now I just keep the parID, index, and vRefNum which takes less
  200.    memory and so I can…
  201.      —Now show the full pathname, type, and creator of clicked–on files in the
  202.    results list. Also changed the font of the file name item to Geneva
  203.       because Monaco was too long for deep folders. This is only an Str255, but
  204.    it seems to be long enough even for deep folders on CW/4.
  205.   —Added secret option for power users to skip or include searching the
  206.    resource header, data reserved for system, and application data portions
  207.    of resource files. I was finding some sort of left over garbage in the
  208.    rez fork of an alias file (in the reserved system data area), so I
  209.    decided to skip searching the entire area. But what if some app stores
  210.    data in the application data area, such as passwords and stuff? This is
  211.    why I made it a secret option. This file will be the only place it will
  212.    be mentioned. So only people who read this file will know about it, or
  213.    people who happen to hold down the Option key while clicking in the
  214.    Search Options popup. (Hint; that’s how you turn the option on and
  215.    off.:) It’s default state is on, rez header+ skipped.
  216.   —Changed the way the main window works. Added a little triangle PICT item
  217.    that toggles the search result items. I did this for a couple reasons:
  218.    ◊Faster window updating if File Safari is kept hanging around while
  219.     using other app’s. Just hide the result items when not in use.
  220.    ◊Thinking about adding boxes for the clicked–on file’s Type, Creator,
  221.     and the offset of the match in the file. These extra items would make
  222.     more clutter, which would make reason #1 more attractive.
  223.    ◊I’ve never used AppendDITL before, so it was good practice. :)
  224.  —Added a total files searched item.
  225.  —Replaced all calls to CallUserItemProc with the actual function calls
  226.   they contain. (New habits are hard to break.;)
  227.  —Fixed some things in the search code. Tested it with a file of buffSize
  228.   length. It now finds only one match if the search string is right at the
  229.   end of the buffer. I was also doing the same long calculation twice, so
  230.   I replaced that with a local var (but CodeWarrior was probably optimizing
  231.   that on its own).
  232.  —Instead of adding the Type, Creator, and offset boxes, I added a popup
  233.   that shows this into for each match. Just click and hold on a match for
  234.   your system’s double–click time and the popup will appear.
  235.  —Got CW5 in the mail! Only had to make one change!
  236.  —Made full use of CW5’s new PPC optimization. Too bad I can’t tell the
  237.   difference. :/ (Somebody give me an 8100 or I’ll puke all over my code.)
  238.  —Started using temp memory for the search buffers if enough is available.
  239.  —Changed searchInFile’s inner loop to be more efficient.
  240.  —Made my own Munger function to handle both normal and case–ignored
  241.   searches, using a lookup table for case–ignored conversion. It’s 67%
  242.   faster than Munger normally and 54% faster than my use of Munger when
  243.   ignoring case. A full case–sensitive search of File Safari’s project
  244.   folder took an average of 4.1 seconds with Munger and an average of 2.8
  245.   seconds with myMunger. Now I don’t need two buffers for case–ignored
  246.   searches because I don’t have to copy an upper–case version of the buffer.
  247.  —Added Ignore Diacriticals option in Search Options popup menu. Be careful
  248.   when using the Hex Search button as the Ignore Case and Ignore
  249.   Diacriticals options *still* apply to your resulting hex string. E.g.:
  250.   Search String “0x61” (‘a’) will turn into “0x41” (‘A’) if Ignore Case is
  251.   turned on.
  252.  —When a search is started, disabled Hex Search button and changed Search
  253.   button to Stop so it’s more obvious that the search can be stopped.
  254.   Clicking the Stop button, hitting Return, Enter, Escape, or Command–.
  255.   all stop the search. Also disabled my menus and handled mouseDown’s in
  256.   menubar and drag region.
  257.  —I was comparing File Safari’s search results to that of Search Files when
  258.   I noticed FS found more matches than SF with the same options turned on.
  259.   So I thought it’d be nice to have a Save Results function so I could
  260.   compare FS’s to SF’s. This is now an item in the File menu. BTW, FS’s
  261.   and SF’s search times are almost identical in my tests. FS took 1 second
  262.   longer to search one of my hard drives with Ignore Case and TEXT Files
  263.   Only turned on.
  264.  —Found Search Files’ problem; it doesn’t find a match if the search string
  265.   is butted up against the end of the file. File Safari does this correctly.
  266.   Nyah. :) It also searches folders in a more intelligent manner.
  267.  
  268.  
  269. Changes in 1.0b4 — 94\12\28:
  270.   —Fixed bug where Resource Editor menu item string would contain
  271.    garbage until a rez editor was chosen.
  272.   —Fixed bug that would set the Resource Editor string to empty
  273.    if the user chose Choose resource editor… and clicked Cancel.
  274.   —Added a default TEXT File Editor that can be used to view all
  275.    TEXT files when double–clicked. It’s chosen like the Resource
  276.    Editor and has a menu item to turn on/off using it.
  277.   —Improved pref loading scheme so new prefs will be created if
  278.    they aren’t found, and old prefs that aren’t the current size
  279.    will be deleted and re–created.
  280.   —Changed all menu item strings to title case.
  281.   —The window is now dragable. Ooops. :)
  282.   —If the current Search Dir is one from the popup, and the user
  283.    deletes that item from the popup, the Add Current Search Dir
  284.    menu item is re–enabled.
  285.   —If the Option key is held while double–clicking on a match in
  286.    the results, the user’s TEXT editor will be used to open the
  287.    file, no matter what type the file is or which fork the match
  288.    was found in. This is a power user feature, and is especially
  289.    useful for people who have Really Cool App’s like MuffEdit that
  290.    can open *any* file’s data fork and also snoop in the rez fork.
  291.   —Got rid of desk scrap purging if the scrap was not TEXT data.
  292.    Stopped bad practice of doing ZeroScrap and TEToScrap when
  293.    switching to the background.
  294.  
  295.  
  296. Changes in 1.0b3 — 94\12\21:
  297.   —Added drag & drop of folders and disks to set the Search Dir.
  298.   —Added openDoc and quitApp Æ’s.
  299.   —Changed the name of the main window to File Safari.
  300.   —Fixed more Balloon Help.
  301.   —Fixed some incompatibilities with Norton Directory Assistance.
  302.    Hopefully this will fix the problems with SuperBoomerang too.
  303.    I don’t know why these companies can’t write stuff that doesn’t
  304.    interfere with standard Apple routines. If you’re gonna change
  305.    the current dir, then tell the goddamn hook that you did so!
  306.    I also found that, if a button has been added to a CustomGetFile
  307.    box, and you SetDialogDefaultItem on it while the standard Open
  308.    button is disabled, NDA doesn’t know about it, but instead sends
  309.    an itemHit message of 0x1000 + the char number. Bad, bad, bad
  310.    programming style not to call the standard ModalDialog filter
  311.    when you mess with dialog events.
  312.   —It was reported that no matches are found on a PPC, even though
  313.    it’s searching through the correct files. I have no idea why
  314.    this wouldn’t work, unless Munger doesn’t work correctly on PPC’s.
  315.    I changed the FSRead/Munger buffer pointer to a handle just to
  316.    see if that has anything to do with it, which I really doubt.
  317.   —Added version number to About box.
  318.   —Improved finding a double–clicked file’s creator, launching it,
  319.    bringing it to the front, and sending the openDoc Æ.
  320.   —Implemented the resource editor stuff.
  321.   —Correctly enabled Add Current Search Dir popup menu item and
  322.    Search button when a folder/volume is drag & dropped onto File
  323.    Safari in the Finder.
  324.  
  325.  
  326. Changes in 1.0b2 — 94\12\16:
  327.   —Added current file pathname to main window while searching.
  328.   —Added Matches item in dialog.
  329.   —Fixed some Balloon Help.
  330.   —Added check for System 7.
  331.   —Added check for B&W and put up the B&W version of the About PICT.
  332.   —Added call to smallEvent at the end of the searchInFile loop so
  333.    we don’t have to wait as long to abort.
  334.   —Added SystemTask to smallEvent so some other stuff could process.
  335.   —After a search has completed, select the Search String text.
  336.   —Set the cursor to arrow when suspend/resume event is received.
  337.   —When clicking on an item in the result list, the file name is
  338.    shown.
  339.   —Progress information is shown while finding a double–clicked–on
  340.    file’s creator and process or app, and sending the AEOpenDoc.
  341.   —Fixed it so when the result list is clicked past the end of the
  342.    last line, it selects the last line.
  343.   
  344.  
  345. 1.0b1 — 94\12\15?:
  346.   —Initial beta release.
  347.  
  348. */